package ms.jacrim.pddl.evaluator;

import ms.jacrim.pddl.PddlSolution;
import ms.jacrim.pddl.SolutionEvaluator;
import ms.utils.XmlFile;

import org.w3c.dom.Element;

public abstract class Evaluator implements SolutionEvaluator {

	private float coeffience;
	protected XmlFile config;
	
	public Evaluator(float coeffience) {
		this.coeffience = coeffience;
	}
	
	@Override
	public abstract String Name();

	@Override
	public abstract float evaluate(PddlSolution solution) throws Exception;

	@Override
	public float getCoefficence() {
		return coeffience;
	}

	@Override
	public void setCoeffience(float value) {
		coeffience = value;
	}

	@Override
	public void loadConfig(Element node) {
		config = new XmlFile((Element) node.getOwnerDocument().getLastChild());
	}
	
	public <T> T get(String propertyName) {
		return null;
	}
	
	public <T> void set(String propertyName, T value) {

	}
}
